<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <% if (typeof topic !== 'undefined') { %>
    <title><%= topic.title %> - <%= config.name %></title>
    <% } else if (typeof pageTitle !== 'undefined') { %>
    <title><%= pageTitle %> - <%= config.name %></title>
    <% } else { %>
    <title><%= config.description %></title>
    <% } %>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <!-- see http://smerity.com/articles/2013/where_did_all_the_http_referrers_go.html -->
    <meta name="referrer" content="always" />
    <meta name="description" content="<%= config.description %>" />
    <meta name="keywords" content="<%= config.keywords %>" />
    <meta name="author" content="@jiayi" />
    <meta property="wb:webmaster" content="617be6bd946c6b96" />
    <meta content="_csrf" name="csrf-param" />
    <meta content="<%= csrf %>" name="csrf-token" />
    <link title="RSS" type="application/rss+xml" rel="alternate" href="/rss" />
    <link
      rel="icon"
      href="/assets/images/cnode_icon_32.png"
      type="image/x-icon"
    />
    <!-- style -->
    <%- Loader('/assets/stylesheets/index.min.css')
    .css('/assets/libs/bootstrap/css/bootstrap.css')
    .css('/assets/stylesheets/common.css')
    .css('/assets/stylesheets/style.less')
    .css('/assets/stylesheets/responsive.css')
    .css('/assets/stylesheets/jquery.atwho.css')
    .css('/assets/libs/editor/editor.css')
    .css('/assets/libs/webuploader/webuploader.css')
    .css('/assets/libs/code-prettify/prettify.css')
    .css('/assets/libs/font-awesome/css/font-awesome.css') .done(assets,
    config.site_static_host, config.mini_assets) %>
    <!-- append style -->
    <%- block("styles").toString() %>
  </head>

  <body>
    <header class="navbar">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="/">
            <img src="/assets/images/cnodejs_light.svg" />
          </a>
          <form id="search_form" class="navbar-search" action="/search">
            <input
              type="text"
              id="q"
              name="q"
              class="search-query span3"
              value=""
            />
          </form>
          <ul class="nav pull-right">
            <li><a href="/">首页</a></li>
            <% if (current_user){ %>
            <li>
              <a href="/my/messages">
                <% if (current_user.messages_count) { %>
                <span class="big messages_count"
                  ><%= current_user.messages_count %></span
                >
                <% } %> 未读消息
              </a>
            </li>
            <% } %>
            <li><a href="/getstart">新手入门</a></li>
            <li><a href="/api">API</a></li>
            <li><a href="/about">关于</a></li>
            <% if (current_user) { %>
            <li><a href="/setting">设置</a></li>
            <li>
              <a href="/logout" data-method="post" rel="nofollow">退出</a>
            </li>
            <% } else { %>
            <li><a href="/register">注册</a></li>
            <li><a href="/login">登录</a></li>
            <% } %>
          </ul>
          <a class="btn btn-navbar" id="responsive-sidebar-trigger">
            <span class="icon-bar"></span><span class="icon-bar"></span
            ><span class="icon-bar"></span>
          </a>
        </div>
      </div>
    </header>
    <main id="main">
      <%- body -%>
    </main>
    <footer id="footer">
      <div id="footer_main">
        <div class="links">
          <a class="dark" href="/rss">RSS</a> |
          <a class="dark" href="https://github.com/jiayisheji/nest-cnode/"
            >源码地址</a
          >
        </div>

        <div class="col_fade">
          <p>
            CNode 社区为国内最专业的 Node.js 开源技术社区，致力于 Node.js
            的技术研究。
          </p>
          <p>
            服务器赞助商为
            <a
              href="http://www.ucloud.cn/?utm_source=zanzhu&utm_campaign=cnodejs&utm_medium=display&utm_content=yejiao&ytag=cnodejs_logo"
              target="_blank"
              class="sponsor_outlink"
              data-label="ucloud_bottom"
            >
              <img
                src="//dn-cnode.qbox.me/FuIpEaM9bvsZKnQ3QfPtBHWQmLM9"
                title="ucloud"
                alt="ucloud"
                width="92px"
              />
            </a>
            ，存储赞助商为
            <a
              href="http://www.qiniu.com/?ref=cnode"
              target="_blank"
              class="sponsor_outlink"
              data-label="qiniu_bottom"
            >
              <img
                src="//dn-cnode.qbox.me/Fg0jtDIcTqVC049oVu5-sn6Om4NX"
                title="七牛云存储"
                alt="七牛云存储"
                width="115px"
              />
            </a>
            ，由
            <a
              href="https://www.aliyun.com/product/nodejs?ref=cnode"
              target="_blank"
              class="sponsor_outlink"
              data-label="alinode_bottom"
            >
              <img
                src="//dn-cnode.qbox.me/FpMZk31PDyxkC8yStmMQL4XroaGD"
                title="alinode"
                alt="alinode"
                height="54px"
                width="166px"
              /> </a
            >提供应用性能服务。
          </p>
          <p>
            新手搭建 Node.js 服务器，推荐使用无需备案的
            <a href="https://www.digitalocean.com/?refcode=eba02656eeb3"
              >DigitalOcean(https://www.digitalocean.com/)</a
            >
          </p>
        </div>
      </div>
    </footer>
    <div id="backtotop">回到顶部</div>
    <div id="sidebar-mask"></div>
    <!-- scripts -->
    <%- Loader('/assets/index.min.js') .js('/assets/libs/jquery-2.1.0.js')
    .js('/assets/libs/lodash.compat.js') .js('/assets/libs/jquery-ujs.js')
    .js('/assets/libs/bootstrap/js/bootstrap.js')
    .js('/assets/libs/jquery.caret.js') .js('/assets/libs/jquery.atwho.js')
    .js('/assets/libs/markdownit.js')
    .js('/assets/libs/code-prettify/prettify.js') .js('/assets/libs/qrcode.js')
    .js('/assets/javascripts/main.js') .js('/assets/javascripts/responsive.js')
    .done(assets, config.site_static_host, config.mini_assets) %>
    <!-- append scripts -->
    <%- block("scripts").toString() %>
  </body>
</html>
